<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>p4_元素溢出替换为省略号</title>
  <style>
      div{
        width: 200px;
        /*height: 50px;*/
        background-color: #ff0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
  </style>
</head>
<body>
    <div>
      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad delectus deleniti deserunt dolor dolorum eos expedita illo illum magni minima nam necessitatibus, nihil, porro sed soluta tenetur unde. Atque, vitae.
    </div>
</body>
</html>